package edu.neusoft.yiqibike.dao.mapper;

import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.plugins.Page;
import edu.neusoft.yiqibike.common.entity.mysql.SystemDictionary;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import edu.neusoft.yiqibike.common.entity.vo.SystemDictionaryVo;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Set;

/**
 * <p>
 * Mapper接口
 * </p>
 *
 * @author YooLin1c
 * @since 2018-01-09
 */
public interface SystemDicMapper extends BaseMapper<SystemDictionary> {

    List<SystemDictionary> selectByPage(Page<SystemDictionary> page, @Param("ew") Wrapper<Object> condition);

    void updateIsEnableByIds(@Param("ids") Set<String> ids, @Param("isEnable") Integer isEnable, @Param("now") Date now,
                            @Param("realname") String realname);

    SystemDictionary selectByCodeAndGroupCode(@Param("code") String code,@Param("groupCode") String groupCode);

    void deleteBatchByIds(@Param("ids") List<String> ids);

    SystemDictionary select(String id);

    List<SystemDictionary> selectByIds(@Param("ids") List<String> ids);

    List<SystemDictionary> selectByGroupId(String groupId);

    List<SystemDictionaryVo> selectUnion(Page page, @Param("id") String id);
}